# $Id: PKGBUILD 183289 2013-04-20 16:41:23Z heftig $
# Maintainer: Andrea Scarpino <andrea@archlinux.org>
# Contributor: Pierre Schmitz <pierre@archlinux.de>

pkgname=kdebase-runtime
pkgver=4.10.2
pkgrel=3
pkgdesc="Plugins and applications necessary for the running of KDE applications"
arch=('i686' 'x86_64')
url='https://projects.kde.org/projects/kde/kde-runtime'
license=('GPL' 'LGPL')
depends=("kdelibs>=${pkgver}" 'kactivities' 'smbclient' 'libssh' 'libcanberra' 'oxygen-icons'
         'xorg-xauth')
makedepends=('pkg-config' 'cmake' 'automoc4' 'kdepimlibs' 'openslp' 'doxygen'
             'networkmanager')
optdepends=('kdepimlibs: to generate drkonqi reports'
            'htdig: to build the search index in khelpcenter'
            'rarian: needed by khelpcenter'
            'gdb: drkonq crash handler')
install="${pkgname}.install"
source=("http://download.kde.org/stable/${pkgver}/src/kde-runtime-${pkgver}.tar.xz")
sha1sums=('b7f3c3907b8f19dcd975b1724b8ae01c4cae638b')

build() {
	cd "${srcdir}"
	mkdir build
	cd build
	cmake ../kde-runtime-${pkgver} \
		-DCMAKE_BUILD_TYPE=Release \
		-DKDE4_BUILD_TESTS=OFF \
		-DCMAKE_SKIP_RPATH=ON \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DWITH_QNtrack=OFF -DSAMBA_INCLUDE_DIR=/usr/include/samba-4.0
	make
}

package() {
	cd "$srcdir/build"
	make DESTDIR="$pkgdir" install
	rm -f "${pkgdir}/usr/share/icons/hicolor/index.theme"

	ln -sf /usr/lib/kde4/libexec/kdesu "${pkgdir}/usr/bin/"
}
